home *** CD-ROM | disk | FTP | other *** search
/ EnigmA Amiga Run 1999 January / EnigmA AMIGA RUN 33 (1999)(G.R. Edizioni)(IT)[!][issue 1999-01].iso / earcd / faq / computer-lang / java / programmers / diff.z / diff
Internet Message Format  |  1999-01-01  |  5KB

  1. Path: senator-bedfellow.mit.edu!bloom-beacon.mit.edu!news.kodak.com!news-nysernet-16.sprintlink.net!news-east1.sprintlink.net!news-peer1.sprintlink.net!news.sprintlink.net!newsfeed.berkeley.edu!su-news-hub1.bbnplanet.com!news.gtei.net!news1.best.com!news.idiom.com!news3.best.com!nntp1.ba.best.com!not-for-mail
  2. From: pvdl@best.com (Peter van der Linden)
  3. Newsgroups: comp.lang.java.programmer,comp.lang.java.help,comp.lang.java.gui,comp.answers,news.answers
  4. Subject: Java Programmers FAQ -- diffs
  5. Followup-To: poster
  6. Date: 1 Dec 1998 16:19:02 -0800
  7. Approved: news-answers-request@MIT.EDU
  8. Message-ID: <74211m$988$1@shell15.ba.best.com>
  9. References: <7420th$8ud$1@shell15.ba.best.com>
  10. Archive-name: computer-lang/java/programmers/diff
  11. Lines: 106
  12. NNTP-Posting-Host: shell15.ba.best.com
  13. X-Trace: nntp1.ba.best.com 912557948 209 pvdl@206.184.139.147
  14. Xref: senator-bedfellow.mit.edu comp.lang.java.programmer:171182 comp.lang.java.help:37609 comp.lang.java.gui:22937 comp.answers:34101 news.answers:145719
  15.  
  16.   Here are the Java FAQ diffs from the last posting.
  17.  
  18.  
  19. 11c11
  20. - Last-modified: 1998/11/18
  21. ---
  22. + Last-modified: 1998/11/22
  23. 560a566,592
  24. +  19. (Sect 2.) How can I find out exactly what version of Java I have on my
  25. +      system?
  26. +      [*] On a Solaris system, you can use the pkginfo command, like this:
  27. +         pkginfo -l SUNWjvrt
  28. +      It will give a reply like this:
  29. +         PKGINST:  SUNWjvrt
  30. +            NAME:  JavaVM run time environment
  31. +        CATEGORY:  system
  32. +            ARCH:  sparc
  33. +         VERSION:  1.1.6,REV=1998.07.30.16.21
  34. +         BASEDIR:  /
  35. +          VENDOR:  Sun Microsystems, Inc.
  36. +       ...etc
  37. +      You may also try
  38. +         java -fullversion
  39. +      Although that's not an officially-supported command option, and has
  40. +      gone away in JDK 1.2. Try also
  41. +         java -version
  42. 3622,3625c3654,3655
  43. -      Where things get even trickier is in the case where you want an int
  44. -      within a certain range, say 1 to 6 to simulate the throw of a die or 1
  45. -      to 52 to represent a playing card. Class Random has a nextInt method
  46. -      that will return any integer:
  47. ---
  48. +      JDK 1.2 adds another version of nextInt that accepts a parameter for
  49. +      returning ranged random numbers.
  50. 3626a3657,3661
  51. +      Where things get trickier is when you use JDK 1.1 and want an int in a
  52. +      certain range, say 1 to 6 to simulate the throw of a die or 1 to 52 to
  53. +      represent a playing card. Class Random has a nextInt method that will
  54. +      return any integer:
  55. 5039c5074
  56. -          g.drawImage(offg, 0, 0, null);
  57. ---
  58. +          g.drawImage(myimage, 0, 0, null);
  59. 5045c5080
  60. -          g.drawImage(offg, 0, 0, null);
  61. ---
  62. +          g.drawImage(myimage, 0, 0, null);
  63. 5050c5085
  64. -      clearest to override them separately, like this.
  65. ---
  66. +      clearest to override them separately, as in the example.
  67. 5155,5160c5190,5191
  68. -      [*] There is no way in Java today to write code to force a window to
  69. -      iconify or deiconify. There is a way (tested on Windows and UNIX) to
  70. -      achieve this effect that involves creating and destroying peers, but it
  71. -      is not recommended. You can drop into native code to do it. The "party
  72. -      line" in JavaSoft is that it is because Java is an application
  73. -      language, not a window manager. Everyone wishes they'd add it.
  74. ---
  75. +      [*] JDK 1.1 had no way to write code to force a window to iconify or
  76. +      deiconify. Support was added in JDK 1.2.
  77. 5161a5193,5197
  78. +           MyFrame.setState( Frame.ICONIFIED );
  79. +           MyFrame.setState( Frame.NORMAL );
  80. +      will do the trick. There is a corresponding getState();
  81. 5381c5417
  82. -      import javax.swing.plaf.windows.WindowsLookAndFeel;
  83. ---
  84. +      import com.sun.java.swing.plaf.windows.WindowsLookAndFeel;
  85. 5948c5984
  86. -  15. (Sect. 12) How can I resize an applet?
  87. ---
  88. +  15. (Sect. 13) How can I resize an applet?
  89. 6669,6672c6705,6709
  90. -      streams. If you close one of them, the other seems to 'break'
  91. -      instantly. Check whether this is happening for you, by adding the
  92. -      matched pair.
  93. -      [comments from net gurus welcome]
  94. ---
  95. +      streams. A TCP connection is full duplex, but either the send or
  96. +      receive side may be closed independently. By default, the remote end
  97. +      will take the close as indicating that the connection has simply been
  98. +      closed, and will close its end as well. Check whether this is happening
  99. +      for you, by adding the matched pair. Use tcpdump to check this.
  100. 7456,7463c7493,7501
  101. -      javac -J-Djavac.pipe.output=true myfile.java > errors.txt You typically
  102. ---
  103. +      javac -J-Djavac.pipe.output=true myfile.java > errors.txt In JDK 1.2,
  104. +      you can use: javac -Xstdout
  105. +      You typically use this when a compilation produces a lot of error
  106. 8568c8606
  107. - Tomm Hoeft
  108. ---
  109. + Tomm Hoeft, King Dale, Joe Halpin
  110.